namespace SmartSoft.Lists
{
    using SmartSoft;
    using SmartSoft.Controls;
    using SmartSoft.Properties;
    using SmartSoft.ADP;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormDmVtEditor : FormListEditor
    {
        private IContainer components;
        private bool ib_PictureChanged;
        private string is_PicturePath;
        private LabelControl lblDvt;
        private LabelControl lblIs_Stop;
        private LabelControl lblIs_Stop0;
        private LabelControl lblLoai_Vt;
        private LabelControl lblLoai_Vt0;
        private LabelControl lblMa_Nh_Vt;
        private LabelControl lblMa_Vt;
        private LabelControl lblTen_Vt;
        private LabelControl lblTen_Vt_E;
        private System.Windows.Forms.PictureBox PictureBox;
        private Panel pnlPicture;
        private TextControl txtDvt;
        private TextOption txtIs_Stop;
        private TextOption txtLoai_Vt;
        private TextSearch txtMa_Nh_Vt;
        private TextControl txtMa_Vt;
        private TextControl txtTen_Nh_Dm;
        private TextControl txtTen_Nh_Vt;
        private TextControl txtTen_Sp;
        private TextControl txtTen_Tk_Ck;
        private TextControl txtTen_Tk_Dt;
        private TextControl txtTen_Tk_HBTL;
        private TextControl txtTen_Vt;
        private TextControl txtTen_Vt_E;

        public FormDmVtEditor()
        {
            this.InitializeComponent();
            //this.txtDvt0.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtHe_So0.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtGia_Mua0.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtGia_Ban0.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtDvt1.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtHe_So1.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtGia_Mua1.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtGia_Ban1.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtDvt2.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtHe_So2.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtGia_Mua2.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtGia_Ban2.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtDvt3.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtHe_So3.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtGia_Mua3.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtGia_Ban3.GotFocus += new EventHandler(this.txtDvt0_GotFocus);
            //this.txtMa_Sp.GotFocus += new EventHandler(this.txtMa_Sp_GotFocus);
            //this.txtLoai_Vt.LostFocus += new EventHandler(this.txtMa_Sp_GotFocus);
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormDmVtEditor));
            this.txtMa_Vt = new SmartSoft.Controls.TextControl();
            this.lblMa_Vt = new SmartSoft.Controls.LabelControl();
            this.txtTen_Vt = new SmartSoft.Controls.TextControl();
            this.lblTen_Vt = new SmartSoft.Controls.LabelControl();
            this.txtTen_Vt_E = new SmartSoft.Controls.TextControl();
            this.lblTen_Vt_E = new SmartSoft.Controls.LabelControl();
            this.txtDvt = new SmartSoft.Controls.TextControl();
            this.lblDvt = new SmartSoft.Controls.LabelControl();
            this.txtLoai_Vt = new SmartSoft.Controls.TextOption();
            this.lblLoai_Vt = new SmartSoft.Controls.LabelControl();
            this.lblIs_Stop = new SmartSoft.Controls.LabelControl();
            this.txtIs_Stop = new SmartSoft.Controls.TextOption();
            this.txtTen_Tk_Dt = new SmartSoft.Controls.TextControl();
            this.txtTen_Tk_Ck = new SmartSoft.Controls.TextControl();
            this.txtTen_Tk_HBTL = new SmartSoft.Controls.TextControl();
            this.lblMa_Nh_Vt = new SmartSoft.Controls.LabelControl();
            this.txtMa_Nh_Vt = new SmartSoft.Controls.TextSearch();
            this.txtTen_Nh_Vt = new SmartSoft.Controls.TextControl();
            this.txtTen_Sp = new SmartSoft.Controls.TextControl();
            this.txtTen_Nh_Dm = new SmartSoft.Controls.TextControl();
            this.pnlPicture = new System.Windows.Forms.Panel();
            this.PictureBox = new System.Windows.Forms.PictureBox();
            this.lblLoai_Vt0 = new SmartSoft.Controls.LabelControl();
            this.lblIs_Stop0 = new SmartSoft.Controls.LabelControl();
            this.pnlPicture.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
            this.SuspendLayout();
            // 
            // lblPhan_Loai
            // 
            this.lblPhan_Loai.Location = new System.Drawing.Point(12, 293);
            this.lblPhan_Loai.TabIndex = 18;
            // 
            // txtMa_Loai1
            // 
            this.txtMa_Loai1.FirstFilter = "Type = \'VT1\'";
            this.txtMa_Loai1.Location = new System.Drawing.Point(123, 290);
            this.txtMa_Loai1.Size = new System.Drawing.Size(188, 20);
            this.txtMa_Loai1.TabIndex = 7;
            // 
            // txtMa_Loai2
            // 
            this.txtMa_Loai2.FirstFilter = "Type = \'VT2\'";
            this.txtMa_Loai2.Location = new System.Drawing.Point(314, 290);
            this.txtMa_Loai2.Size = new System.Drawing.Size(190, 20);
            this.txtMa_Loai2.TabIndex = 8;
            // 
            // txtMa_Loai3
            // 
            this.txtMa_Loai3.FirstFilter = "Type = \'VT3\'";
            this.txtMa_Loai3.Location = new System.Drawing.Point(507, 290);
            this.txtMa_Loai3.Size = new System.Drawing.Size(188, 20);
            this.txtMa_Loai3.TabIndex = 9;
            // 
            // txtMa_Vt
            // 
            this.txtMa_Vt.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Vt.CheckTextSearched = false;
            this.txtMa_Vt.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Vt.Location = new System.Drawing.Point(123, 28);
            this.txtMa_Vt.MaxLength = 32;
            this.txtMa_Vt.Name = "txtMa_Vt";
            this.txtMa_Vt.OldValue = null;
            this.txtMa_Vt.Size = new System.Drawing.Size(100, 20);
            this.txtMa_Vt.TabIndex = 0;
            this.txtMa_Vt.UserTextLength = SmartSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Vt.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Vt.Value = ((object)(resources.GetObject("txtMa_Vt.Value")));
            // 
            // lblMa_Vt
            // 
            this.lblMa_Vt.AutoSize = true;
            this.lblMa_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Vt.Location = new System.Drawing.Point(12, 31);
            this.lblMa_Vt.Name = "lblMa_Vt";
            this.lblMa_Vt.Size = new System.Drawing.Size(21, 14);
            this.lblMa_Vt.TabIndex = 11;
            this.lblMa_Vt.Text = "Mã";
            // 
            // txtTen_Vt
            // 
            this.txtTen_Vt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Vt.CheckTextSearched = false;
            this.txtTen_Vt.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTen_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Vt.Location = new System.Drawing.Point(123, 50);
            this.txtTen_Vt.MaxLength = 128;
            this.txtTen_Vt.Name = "txtTen_Vt";
            this.txtTen_Vt.OldValue = null;
            this.txtTen_Vt.Size = new System.Drawing.Size(572, 20);
            this.txtTen_Vt.TabIndex = 1;
            this.txtTen_Vt.UserTextLength = SmartSoft.AppInstance.TextControlLength.ItemDescription;
            this.txtTen_Vt.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.All;
            this.txtTen_Vt.Value = ((object)(resources.GetObject("txtTen_Vt.Value")));
            // 
            // lblTen_Vt
            // 
            this.lblTen_Vt.AutoSize = true;
            this.lblTen_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTen_Vt.Location = new System.Drawing.Point(12, 53);
            this.lblTen_Vt.Name = "lblTen_Vt";
            this.lblTen_Vt.Size = new System.Drawing.Size(25, 14);
            this.lblTen_Vt.TabIndex = 12;
            this.lblTen_Vt.Text = "Tên";
            // 
            // txtTen_Vt_E
            // 
            this.txtTen_Vt_E.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Vt_E.CheckTextSearched = false;
            this.txtTen_Vt_E.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTen_Vt_E.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Vt_E.Location = new System.Drawing.Point(123, 139);
            this.txtTen_Vt_E.MaxLength = 128;
            this.txtTen_Vt_E.Multiline = true;
            this.txtTen_Vt_E.Name = "txtTen_Vt_E";
            this.txtTen_Vt_E.OldValue = null;
            this.txtTen_Vt_E.Size = new System.Drawing.Size(339, 126);
            this.txtTen_Vt_E.TabIndex = 5;
            this.txtTen_Vt_E.UserTextLength = SmartSoft.AppInstance.TextControlLength.ItemDescription;
            this.txtTen_Vt_E.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.All;
            this.txtTen_Vt_E.Value = ((object)(resources.GetObject("txtTen_Vt_E.Value")));
            // 
            // lblTen_Vt_E
            // 
            this.lblTen_Vt_E.AutoSize = true;
            this.lblTen_Vt_E.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTen_Vt_E.Location = new System.Drawing.Point(12, 145);
            this.lblTen_Vt_E.Name = "lblTen_Vt_E";
            this.lblTen_Vt_E.Size = new System.Drawing.Size(33, 14);
            this.lblTen_Vt_E.TabIndex = 16;
            this.lblTen_Vt_E.Text = "Mô tả";
            // 
            // txtDvt
            // 
            this.txtDvt.CheckTextSearched = false;
            this.txtDvt.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtDvt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDvt.Location = new System.Drawing.Point(123, 72);
            this.txtDvt.MaxLength = 20;
            this.txtDvt.Name = "txtDvt";
            this.txtDvt.OldValue = null;
            this.txtDvt.Size = new System.Drawing.Size(100, 20);
            this.txtDvt.TabIndex = 2;
            this.txtDvt.UserTextLength = SmartSoft.AppInstance.TextControlLength.ItemUnit;
            this.txtDvt.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.All;
            this.txtDvt.Value = ((object)(resources.GetObject("txtDvt.Value")));
            // 
            // lblDvt
            // 
            this.lblDvt.AutoSize = true;
            this.lblDvt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDvt.Location = new System.Drawing.Point(12, 75);
            this.lblDvt.Name = "lblDvt";
            this.lblDvt.Size = new System.Drawing.Size(59, 14);
            this.lblDvt.TabIndex = 13;
            this.lblDvt.Text = "Đơn vị tính";
            // 
            // txtLoai_Vt
            // 
            this.txtLoai_Vt.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtLoai_Vt.CheckTextSearched = false;
            this.txtLoai_Vt.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtLoai_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtLoai_Vt.InputMask = "2,1,0";
            this.txtLoai_Vt.Location = new System.Drawing.Point(123, 95);
            this.txtLoai_Vt.Name = "txtLoai_Vt";
            this.txtLoai_Vt.OldValue = null;
            this.txtLoai_Vt.Size = new System.Drawing.Size(23, 20);
            this.txtLoai_Vt.TabIndex = 3;
            this.txtLoai_Vt.Text = "0";
            this.txtLoai_Vt.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtLoai_Vt.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
            this.txtLoai_Vt.Value = "0";
            this.txtLoai_Vt.TextChanged += new System.EventHandler(this.txtLoai_Vt_TextChanged);
            // 
            // lblLoai_Vt
            // 
            this.lblLoai_Vt.AutoSize = true;
            this.lblLoai_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblLoai_Vt.Location = new System.Drawing.Point(12, 98);
            this.lblLoai_Vt.Name = "lblLoai_Vt";
            this.lblLoai_Vt.Size = new System.Drawing.Size(27, 14);
            this.lblLoai_Vt.TabIndex = 14;
            this.lblLoai_Vt.Text = "Loại";
            // 
            // lblIs_Stop
            // 
            this.lblIs_Stop.AutoSize = true;
            this.lblIs_Stop.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblIs_Stop.Location = new System.Drawing.Point(12, 120);
            this.lblIs_Stop.Name = "lblIs_Stop";
            this.lblIs_Stop.Size = new System.Drawing.Size(55, 14);
            this.lblIs_Stop.TabIndex = 15;
            this.lblIs_Stop.Text = "Trạng thái";
            // 
            // txtIs_Stop
            // 
            this.txtIs_Stop.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtIs_Stop.CheckTextSearched = false;
            this.txtIs_Stop.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtIs_Stop.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtIs_Stop.InputMask = "1,0";
            this.txtIs_Stop.Location = new System.Drawing.Point(123, 117);
            this.txtIs_Stop.Name = "txtIs_Stop";
            this.txtIs_Stop.OldValue = null;
            this.txtIs_Stop.Size = new System.Drawing.Size(23, 20);
            this.txtIs_Stop.TabIndex = 4;
            this.txtIs_Stop.Text = "1";
            this.txtIs_Stop.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtIs_Stop.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
            this.txtIs_Stop.Value = "1";
            // 
            // txtTen_Tk_Dt
            // 
            this.txtTen_Tk_Dt.BackColor = System.Drawing.SystemColors.Control;
            this.txtTen_Tk_Dt.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Tk_Dt.CheckTextSearched = false;
            this.txtTen_Tk_Dt.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk_Dt.Enabled = false;
            this.txtTen_Tk_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Tk_Dt.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk_Dt.Location = new System.Drawing.Point(229, 339);
            this.txtTen_Tk_Dt.Name = "txtTen_Tk_Dt";
            this.txtTen_Tk_Dt.OldValue = null;
            this.txtTen_Tk_Dt.Size = new System.Drawing.Size(233, 13);
            this.txtTen_Tk_Dt.TabIndex = 13;
            this.txtTen_Tk_Dt.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_Tk_Dt.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Tk_Dt.Value = ((object)(resources.GetObject("txtTen_Tk_Dt.Value")));
            // 
            // txtTen_Tk_Ck
            // 
            this.txtTen_Tk_Ck.BackColor = System.Drawing.SystemColors.Control;
            this.txtTen_Tk_Ck.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Tk_Ck.CheckTextSearched = false;
            this.txtTen_Tk_Ck.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk_Ck.Enabled = false;
            this.txtTen_Tk_Ck.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Tk_Ck.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk_Ck.Location = new System.Drawing.Point(229, 361);
            this.txtTen_Tk_Ck.Name = "txtTen_Tk_Ck";
            this.txtTen_Tk_Ck.OldValue = null;
            this.txtTen_Tk_Ck.Size = new System.Drawing.Size(233, 13);
            this.txtTen_Tk_Ck.TabIndex = 13;
            this.txtTen_Tk_Ck.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_Tk_Ck.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Tk_Ck.Value = ((object)(resources.GetObject("txtTen_Tk_Ck.Value")));
            // 
            // txtTen_Tk_HBTL
            // 
            this.txtTen_Tk_HBTL.BackColor = System.Drawing.SystemColors.Control;
            this.txtTen_Tk_HBTL.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Tk_HBTL.CheckTextSearched = false;
            this.txtTen_Tk_HBTL.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk_HBTL.Enabled = false;
            this.txtTen_Tk_HBTL.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Tk_HBTL.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk_HBTL.Location = new System.Drawing.Point(229, 383);
            this.txtTen_Tk_HBTL.Name = "txtTen_Tk_HBTL";
            this.txtTen_Tk_HBTL.OldValue = null;
            this.txtTen_Tk_HBTL.Size = new System.Drawing.Size(233, 13);
            this.txtTen_Tk_HBTL.TabIndex = 13;
            this.txtTen_Tk_HBTL.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_Tk_HBTL.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Tk_HBTL.Value = ((object)(resources.GetObject("txtTen_Tk_HBTL.Value")));
            // 
            // lblMa_Nh_Vt
            // 
            this.lblMa_Nh_Vt.AutoSize = true;
            this.lblMa_Nh_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Nh_Vt.Location = new System.Drawing.Point(12, 271);
            this.lblMa_Nh_Vt.Name = "lblMa_Nh_Vt";
            this.lblMa_Nh_Vt.Size = new System.Drawing.Size(34, 14);
            this.lblMa_Nh_Vt.TabIndex = 17;
            this.lblMa_Nh_Vt.Text = "Nhóm";
            // 
            // txtMa_Nh_Vt
            // 
            this.txtMa_Nh_Vt.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Nh_Vt.CheckTextSearched = false;
            this.txtMa_Nh_Vt.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Nh_Vt.FieldDisplay = "Ten_Nh_Vt";
            this.txtMa_Nh_Vt.FirstFilter = "Nh_Cuoi_Vt = \'C\'";
            this.txtMa_Nh_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Nh_Vt.Location = new System.Drawing.Point(123, 268);
            this.txtMa_Nh_Vt.MaxLength = 32;
            this.txtMa_Nh_Vt.Name = "txtMa_Nh_Vt";
            this.txtMa_Nh_Vt.OldValue = null;
            this.txtMa_Nh_Vt.Size = new System.Drawing.Size(100, 20);
            this.txtMa_Nh_Vt.TabIndex = 6;
            this.txtMa_Nh_Vt.TableName = "DMNHVT";
            this.txtMa_Nh_Vt.TextDisplay = this.txtTen_Nh_Vt;
            this.txtMa_Nh_Vt.UserTextLength = SmartSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Nh_Vt.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Nh_Vt.Value = ((object)(resources.GetObject("txtMa_Nh_Vt.Value")));
            // 
            // txtTen_Nh_Vt
            // 
            this.txtTen_Nh_Vt.BackColor = System.Drawing.SystemColors.Control;
            this.txtTen_Nh_Vt.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Nh_Vt.CheckTextSearched = false;
            this.txtTen_Nh_Vt.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Nh_Vt.Enabled = false;
            this.txtTen_Nh_Vt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Nh_Vt.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Nh_Vt.Location = new System.Drawing.Point(229, 270);
            this.txtTen_Nh_Vt.Name = "txtTen_Nh_Vt";
            this.txtTen_Nh_Vt.OldValue = null;
            this.txtTen_Nh_Vt.Size = new System.Drawing.Size(233, 13);
            this.txtTen_Nh_Vt.TabIndex = 21;
            this.txtTen_Nh_Vt.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_Nh_Vt.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Nh_Vt.Value = ((object)(resources.GetObject("txtTen_Nh_Vt.Value")));
            // 
            // txtTen_Sp
            // 
            this.txtTen_Sp.BackColor = System.Drawing.SystemColors.Control;
            this.txtTen_Sp.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Sp.CheckTextSearched = false;
            this.txtTen_Sp.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Sp.Enabled = false;
            this.txtTen_Sp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Sp.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Sp.Location = new System.Drawing.Point(229, 427);
            this.txtTen_Sp.Name = "txtTen_Sp";
            this.txtTen_Sp.OldValue = null;
            this.txtTen_Sp.Size = new System.Drawing.Size(233, 13);
            this.txtTen_Sp.TabIndex = 13;
            this.txtTen_Sp.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_Sp.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Sp.Value = ((object)(resources.GetObject("txtTen_Sp.Value")));
            // 
            // txtTen_Nh_Dm
            // 
            this.txtTen_Nh_Dm.BackColor = System.Drawing.SystemColors.Control;
            this.txtTen_Nh_Dm.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Nh_Dm.CheckTextSearched = false;
            this.txtTen_Nh_Dm.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Nh_Dm.Enabled = false;
            this.txtTen_Nh_Dm.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Nh_Dm.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Nh_Dm.Location = new System.Drawing.Point(229, 449);
            this.txtTen_Nh_Dm.Name = "txtTen_Nh_Dm";
            this.txtTen_Nh_Dm.OldValue = null;
            this.txtTen_Nh_Dm.Size = new System.Drawing.Size(233, 13);
            this.txtTen_Nh_Dm.TabIndex = 13;
            this.txtTen_Nh_Dm.UserTextLength = SmartSoft.AppInstance.TextControlLength.None;
            this.txtTen_Nh_Dm.UserTrimMode = SmartSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Nh_Dm.Value = ((object)(resources.GetObject("txtTen_Nh_Dm.Value")));
            // 
            // pnlPicture
            // 
            this.pnlPicture.BackColor = System.Drawing.Color.LimeGreen;
            this.pnlPicture.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.pnlPicture.Controls.Add(this.PictureBox);
            this.pnlPicture.Location = new System.Drawing.Point(468, 94);
            this.pnlPicture.Name = "pnlPicture";
            this.pnlPicture.Size = new System.Drawing.Size(227, 193);
            this.pnlPicture.TabIndex = 10;
            // 
            // PictureBox
            // 
            this.PictureBox.BackgroundImage = global::SmartSoft.Properties.Resources.NoPicture;
            this.PictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.PictureBox.Location = new System.Drawing.Point(3, 3);
            this.PictureBox.Name = "PictureBox";
            this.PictureBox.Size = new System.Drawing.Size(217, 183);
            this.PictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.PictureBox.TabIndex = 0;
            this.PictureBox.TabStop = false;
            this.PictureBox.DoubleClick += new System.EventHandler(this.PictureBox_DoubleClick);
            // 
            // lblLoai_Vt0
            // 
            this.lblLoai_Vt0.AutoSize = true;
            this.lblLoai_Vt0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblLoai_Vt0.ForeColor = System.Drawing.Color.Blue;
            this.lblLoai_Vt0.Location = new System.Drawing.Point(152, 98);
            this.lblLoai_Vt0.Name = "lblLoai_Vt0";
            this.lblLoai_Vt0.Size = new System.Drawing.Size(111, 14);
            this.lblLoai_Vt0.TabIndex = 19;
            this.lblLoai_Vt0.Text = "0-Phụ tùng, 1-Vật liệu";
            // 
            // lblIs_Stop0
            // 
            this.lblIs_Stop0.AutoSize = true;
            this.lblIs_Stop0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblIs_Stop0.ForeColor = System.Drawing.Color.Blue;
            this.lblIs_Stop0.Location = new System.Drawing.Point(152, 120);
            this.lblIs_Stop0.Name = "lblIs_Stop0";
            this.lblIs_Stop0.Size = new System.Drawing.Size(172, 14);
            this.lblIs_Stop0.TabIndex = 20;
            this.lblIs_Stop0.Text = "1-Hoạt động, 0-Đình chỉ hoạt động";
            // 
            // FormDmVtEditor
            // 
            this.AddTitleText = "Thêm mới vật liệu, phụ tùng";
            this.ClientSize = new System.Drawing.Size(707, 322);
            this.Controls.Add(this.lblIs_Stop0);
            this.Controls.Add(this.lblLoai_Vt0);
            this.Controls.Add(this.txtTen_Nh_Dm);
            this.Controls.Add(this.txtTen_Sp);
            this.Controls.Add(this.txtTen_Nh_Vt);
            this.Controls.Add(this.txtTen_Tk_HBTL);
            this.Controls.Add(this.txtTen_Tk_Ck);
            this.Controls.Add(this.txtTen_Tk_Dt);
            this.Controls.Add(this.pnlPicture);
            this.Controls.Add(this.txtMa_Nh_Vt);
            this.Controls.Add(this.txtIs_Stop);
            this.Controls.Add(this.txtLoai_Vt);
            this.Controls.Add(this.lblTen_Vt_E);
            this.Controls.Add(this.lblIs_Stop);
            this.Controls.Add(this.lblMa_Nh_Vt);
            this.Controls.Add(this.lblTen_Vt);
            this.Controls.Add(this.lblLoai_Vt);
            this.Controls.Add(this.lblDvt);
            this.Controls.Add(this.lblMa_Vt);
            this.Controls.Add(this.txtTen_Vt_E);
            this.Controls.Add(this.txtTen_Vt);
            this.Controls.Add(this.txtDvt);
            this.Controls.Add(this.txtMa_Vt);
            this.EditTitleText = "Sửa vật tư, hàng hóa";
            this.FirstFreeCode = "VT1";
            this.Name = "FormDmVtEditor";
            this.SecondFreeCode = "VT2";
            this.Text = "Thêm mới vật liệu, phụ tùng";
            this.ThirdFreeCode = "VT3";
            this.Controls.SetChildIndex(this.lblPhan_Loai, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai1, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai2, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai3, 0);
            this.Controls.SetChildIndex(this.txtMa_Vt, 0);
            this.Controls.SetChildIndex(this.txtDvt, 0);
            this.Controls.SetChildIndex(this.txtTen_Vt, 0);
            this.Controls.SetChildIndex(this.txtTen_Vt_E, 0);
            this.Controls.SetChildIndex(this.lblMa_Vt, 0);
            this.Controls.SetChildIndex(this.lblDvt, 0);
            this.Controls.SetChildIndex(this.lblLoai_Vt, 0);
            this.Controls.SetChildIndex(this.lblTen_Vt, 0);
            this.Controls.SetChildIndex(this.lblMa_Nh_Vt, 0);
            this.Controls.SetChildIndex(this.lblIs_Stop, 0);
            this.Controls.SetChildIndex(this.lblTen_Vt_E, 0);
            this.Controls.SetChildIndex(this.txtLoai_Vt, 0);
            this.Controls.SetChildIndex(this.txtIs_Stop, 0);
            this.Controls.SetChildIndex(this.txtMa_Nh_Vt, 0);
            this.Controls.SetChildIndex(this.pnlPicture, 0);
            this.Controls.SetChildIndex(this.txtTen_Tk_Dt, 0);
            this.Controls.SetChildIndex(this.txtTen_Tk_Ck, 0);
            this.Controls.SetChildIndex(this.txtTen_Tk_HBTL, 0);
            this.Controls.SetChildIndex(this.txtTen_Nh_Vt, 0);
            this.Controls.SetChildIndex(this.txtTen_Sp, 0);
            this.Controls.SetChildIndex(this.txtTen_Nh_Dm, 0);
            this.Controls.SetChildIndex(this.lblLoai_Vt0, 0);
            this.Controls.SetChildIndex(this.lblIs_Stop0, 0);
            this.pnlPicture.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        protected override void OnReset()
        {
            if ((base.NewChecked && (base.LocalCurrentRow == null)) && (base.LocalFormLister.ParentCurrentRow != null))
            {
                //this.txtHe_So0.Value = 1;
                //this.txtHe_So1.Value = 1;
                //this.txtHe_So2.Value = 1;
                //this.txtHe_So3.Value = 1;
                //this.txtSL_Ton_Max.Value = 0;
                //this.txtSL_Ton_Min.Value = 0;
                this.txtMa_Nh_Vt.Text = base.LocalFormLister.ParentCurrentRow[base.LocalFormLister.ParentFieldName].ToString();
                this.txtTen_Nh_Vt.Text = base.LocalFormLister.ParentCurrentRow["Ten_Nh_Vt"].ToString();
            }
            base.OnReset();
        }

        public override bool OnSave()
        {
            DataRow localCurrentRow;
            if (string.IsNullOrEmpty(this.txtMa_Vt.Text))
            {
                MessageBox.Show("Chưa nhập mã vật tư, hàng hóa!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (string.IsNullOrEmpty(this.txtTen_Vt.Text))
            {
                MessageBox.Show("Chưa nhập tên vật tư, hàng hóa!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (string.IsNullOrEmpty(this.txtDvt.Text))
            {
                MessageBox.Show("Chưa nhập đơn vị tính!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (string.IsNullOrEmpty(this.txtMa_Nh_Vt.Text))
            {
                MessageBox.Show("Chưa nhập mã nhóm vật tư, hàng hóa!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (base.NewChecked)
            {
                localCurrentRow = base.LocalTable.NewRow();
            }
            else
            {
                localCurrentRow = base.LocalCurrentRow;
            }
            localCurrentRow["Ma_Vt"] = this.txtMa_Vt.Value;
            localCurrentRow["Ten_Vt"] = this.txtTen_Vt.Value;
            localCurrentRow["Ten_Vt_E"] = this.txtTen_Vt_E.Value;
            localCurrentRow["Dvt"] = this.txtDvt.Value;
            //localCurrentRow["Dvt_E"] = this.txtDvt_E.Value;
            //localCurrentRow["Gia_Mua"] = this.txtGia_Mua.Value;
            //localCurrentRow["Gia_Ban"] = this.txtGia_Ban.Value;
            //localCurrentRow["Dvt0"] = this.txtDvt0.Value;
            //localCurrentRow["He_So0"] = this.txtHe_So0.Value;
            //localCurrentRow["Gia_Mua0"] = this.txtGia_Mua0.Value;
            //localCurrentRow["Gia_Ban0"] = this.txtGia_Ban0.Value;
            //localCurrentRow["Dvt1"] = this.txtDvt1.Value;
            //localCurrentRow["He_So1"] = this.txtHe_So1.Value;
            //localCurrentRow["Gia_Mua1"] = this.txtGia_Mua1.Value;
            //localCurrentRow["Gia_Ban1"] = this.txtGia_Ban1.Value;
            //localCurrentRow["Dvt2"] = this.txtDvt2.Value;
            //localCurrentRow["He_So2"] = this.txtHe_So2.Value;
            //localCurrentRow["Gia_Mua2"] = this.txtGia_Mua2.Value;
            //localCurrentRow["Gia_Ban2"] = this.txtGia_Ban2.Value;
            //localCurrentRow["Dvt3"] = this.txtDvt3.Value;
            //localCurrentRow["He_So3"] = this.txtHe_So3.Value;
            //localCurrentRow["Gia_Mua3"] = this.txtGia_Mua3.Value;
            //localCurrentRow["Gia_Ban3"] = this.txtGia_Ban3.Value;
            //localCurrentRow["SL_Ton_Min"] = this.txtSL_Ton_Min.Value;
            //localCurrentRow["SL_Ton_Max"] = this.txtSL_Ton_Max.Value;
            //localCurrentRow["Thue_Xuat"] = this.txtThue_Xuat.Value;
            localCurrentRow["Is_Stop"] = this.txtIs_Stop.Value;
            localCurrentRow["Loai_Vt"] = this.txtLoai_Vt.Value;
            //localCurrentRow["Tk_Vt"] = this.txtTk_Vt.Value;
            //localCurrentRow["Ten_Tk_Vt"] = this.txtTen_Tk_Vt.Value;
            //localCurrentRow["Tk_Gv"] = this.txtTk_Gv.Value;
            //localCurrentRow["Ten_Tk_Gv"] = this.txtTen_Tk_Gv.Value;
            //localCurrentRow["Tk_Dt"] = this.txtTk_Dt.Value;
            //localCurrentRow["Ten_Tk_Dt"] = this.txtTen_Tk_Dt.Value;
            //localCurrentRow["Tk_Ck"] = this.txtTk_Ck.Value;
            //localCurrentRow["Ten_Tk_Ck"] = this.txtTen_Tk_Ck.Value;
            //localCurrentRow["Tk_HBTL"] = this.txtTk_HBTL.Value;
            //localCurrentRow["Ten_Tk_HB"] = this.txtTen_Tk_HBTL.Value;
            localCurrentRow["Ma_Nh_Vt"] = this.txtMa_Nh_Vt.Value;
            localCurrentRow["Ten_Nh_Vt"] = this.txtTen_Nh_Vt.Value;
            //localCurrentRow["Ma_Sp"] = this.txtMa_Sp.Value;
            //localCurrentRow["Ten_Sp"] = this.txtTen_Sp.Value;
            //localCurrentRow["Ma_Nh_Dm"] = this.txtMa_Nh_Dm.Value;
            //localCurrentRow["Ten_Nh_Dm"] = this.txtTen_Nh_Dm.Value;
            localCurrentRow["Ma_Loai1"] = base.txtMa_Loai1.Value;
            localCurrentRow["Ma_Loai2"] = base.txtMa_Loai2.Value;
            localCurrentRow["Ma_Loai3"] = base.txtMa_Loai3.Value;
            DmVtDataAccess access = new DmVtDataAccess();
            if (base.ShowMessage(localCurrentRow, access.SaveRow(base.NewChecked, localCurrentRow)))
            {
                return false;
            }
            if (base.NewChecked)
            {
                base.LocalTable.Rows.Add(localCurrentRow);
            }
            if (this.ib_PictureChanged)
            {
                SSDataAccess.SetPicture(base.LocalFormLister.LocalTableName, base.LocalFormLister.LocalKeyField, base.LocalCurrentRow[base.LocalFormLister.LocalKeyField], "Image_Name", "Image_Item", this.is_PicturePath);
            }
            base.LocalCurrentRow = localCurrentRow;
            base.LocalTable.AcceptChanges();
            this.txtMa_Vt.Focus();
            return base.OnSave();
        }

        public override void OnShow()
        {
            this.txtMa_Vt.Value = base.LocalCurrentRow["Ma_Vt"];
            this.txtTen_Vt.Value = base.LocalCurrentRow["Ten_Vt"];
            this.txtTen_Vt_E.Value = base.LocalCurrentRow["Ten_Vt_E"];
            this.txtDvt.Value = base.LocalCurrentRow["Dvt"];
            //this.txtDvt_E.Value = base.LocalCurrentRow["Dvt_E"];
            //this.txtGia_Mua.Value = base.LocalCurrentRow["Gia_Mua"];
            //this.txtGia_Ban.Value = base.LocalCurrentRow["Gia_Ban"];
            //this.txtDvt0.Value = base.LocalCurrentRow["Dvt0"];
            //this.txtHe_So0.Value = base.LocalCurrentRow["He_So0"];
            //this.txtGia_Mua0.Value = base.LocalCurrentRow["Gia_Mua0"];
            //this.txtGia_Ban0.Value = base.LocalCurrentRow["Gia_Ban0"];
            //this.txtDvt1.Value = base.LocalCurrentRow["Dvt1"];
            //this.txtHe_So1.Value = base.LocalCurrentRow["He_So1"];
            //this.txtGia_Mua1.Value = base.LocalCurrentRow["Gia_Mua1"];
            //this.txtGia_Ban1.Value = base.LocalCurrentRow["Gia_Ban1"];
            //this.txtDvt2.Value = base.LocalCurrentRow["Dvt2"];
            //this.txtHe_So2.Value = base.LocalCurrentRow["He_So2"];
            //this.txtGia_Mua2.Value = base.LocalCurrentRow["Gia_Mua2"];
            //this.txtGia_Ban2.Value = base.LocalCurrentRow["Gia_Ban2"];
            //this.txtDvt3.Value = base.LocalCurrentRow["Dvt3"];
            //this.txtHe_So3.Value = base.LocalCurrentRow["He_So3"];
            //this.txtGia_Mua3.Value = base.LocalCurrentRow["Gia_Mua3"];
            //this.txtGia_Ban3.Value = base.LocalCurrentRow["Gia_Ban3"];
            //this.txtSL_Ton_Min.Value = base.LocalCurrentRow["SL_Ton_Min"];
            //this.txtSL_Ton_Max.Value = base.LocalCurrentRow["SL_Ton_Max"];
            //this.txtThue_Xuat.Value = base.LocalCurrentRow["Thue_Xuat"];
            this.txtIs_Stop.Value = base.LocalCurrentRow["Is_Stop"];
            this.txtLoai_Vt.Value = base.LocalCurrentRow["Loai_Vt"];
            //this.txtTk_Vt.Value = base.LocalCurrentRow["Tk_Vt"];
            //this.txtTen_Tk_Vt.Value = base.LocalCurrentRow["Ten_Tk_Vt"];
            //this.txtTk_Gv.Value = base.LocalCurrentRow["Tk_Gv"];
            //this.txtTen_Tk_Gv.Value = base.LocalCurrentRow["Ten_Tk_Gv"];
            //this.txtTk_Dt.Value = base.LocalCurrentRow["Tk_Dt"];
            //this.txtTen_Tk_Dt.Value = base.LocalCurrentRow["Ten_Tk_Dt"];
            //this.txtTk_Ck.Value = base.LocalCurrentRow["Tk_Ck"];
            //this.txtTen_Tk_Ck.Value = base.LocalCurrentRow["Ten_Tk_Ck"];
            //this.txtTk_HBTL.Value = base.LocalCurrentRow["Tk_HBTL"];
            //this.txtTen_Tk_HBTL.Value = base.LocalCurrentRow["Ten_Tk_HB"];
            this.txtMa_Nh_Vt.Value = base.LocalCurrentRow["Ma_Nh_Vt"];
            this.txtTen_Nh_Vt.Value = base.LocalCurrentRow["Ten_Nh_Vt"];
            //this.txtMa_Sp.Value = base.LocalCurrentRow["Ma_Sp"];
            //this.txtTen_Sp.Value = base.LocalCurrentRow["Ten_Sp"];
            //this.txtMa_Nh_Dm.Value = base.LocalCurrentRow["Ma_Nh_Dm"];
            this.txtTen_Nh_Dm.Value = base.LocalCurrentRow["Ten_Nh_Dm"];
            base.txtMa_Loai1.Value = base.LocalCurrentRow["Ma_Loai1"];
            base.txtMa_Loai2.Value = base.LocalCurrentRow["Ma_Loai2"];
            base.txtMa_Loai3.Value = base.LocalCurrentRow["Ma_Loai3"];
            this.PictureBox.Image = SSDataAccess.GetPicture(base.LocalFormLister.LocalTableName, base.LocalFormLister.LocalKeyField, base.LocalCurrentRow[base.LocalFormLister.LocalKeyField], "Image_Name", "Image_Item");
            base.OnShow();
        }

        private void PictureBox_DoubleClick(object sender, EventArgs e)
        {
            this.ib_PictureChanged = true;
            OpenFileDialog dialog = new OpenFileDialog();
            dialog.InitialDirectory = "";
            dialog.Filter = "JPEG (*.jpg;*.jpeg;*.jpe;*.jfif)|*.jpg;*.jpeg;*.jpe;*.jfif|Bitmap files (*.bmp)|*.bmp|GIF (*.gif)|*.gif|TIFF (*.tif;*.tiff)|*.tif;*.tiff|All files (*.*)|*.*";
            dialog.CheckFileExists = true;
            dialog.ShowDialog();
            this.is_PicturePath = dialog.FileName;
            if (!this.is_PicturePath.Equals(string.Empty))
            {
                this.PictureBox.Image = new Bitmap(this.is_PicturePath);
            }
            else
            {
                this.PictureBox.Image = null;
            }
        }

        private void txtLoai_Vt_TextChanged(object sender, EventArgs e)
        {

        }

        //private void txtDvt0_GotFocus(object sender, EventArgs e)
        //{
        //    if (this.txtDvt.Text.Equals(string.Empty))
        //    {
        //        //this.txtDvt0.Text = string.Empty;
        //        //this.txtDvt0.ReadOnly = true;
        //    }
        //    else
        //    {
        //        //this.txtDvt0.ReadOnly = false;
        //    }
        //    if (this.txtDvt0.Text.Equals(string.Empty))
        //    {
        //        //this.txtDvt1.Text = string.Empty;
        //        //this.txtDvt1.ReadOnly = true;
        //    }
        //    else
        //    {
        //        //this.txtDvt1.ReadOnly = false;
        //    }
        //    if (this.txtDvt1.Text.Equals(string.Empty))
        //    {
        //        this.txtDvt2.Text = string.Empty;
        //        this.txtDvt2.ReadOnly = true;
        //    }
        //    else
        //    {
        //        this.txtDvt2.ReadOnly = false;
        //    }
        //    if (this.txtDvt2.Text.Equals(string.Empty))
        //    {
        //        this.txtDvt3.Text = string.Empty;
        //        this.txtDvt3.ReadOnly = true;
        //    }
        //    else
        //    {
        //        this.txtDvt3.ReadOnly = false;
        //    }
        //    if (this.txtDvt0.Text.Equals(string.Empty))
        //    {
        //        this.txtHe_So0.Value = 1;
        //        this.txtGia_Mua0.Value = 0;
        //        this.txtGia_Ban0.Value = 0;
        //        this.txtHe_So0.ReadOnly = true;
        //        this.txtGia_Mua0.ReadOnly = true;
        //        this.txtGia_Ban0.ReadOnly = true;
        //    }
        //    else
        //    {
        //        this.txtHe_So0.ReadOnly = false;
        //        this.txtGia_Mua0.ReadOnly = false;
        //        this.txtGia_Ban0.ReadOnly = false;
        //    }
        //    if (this.txtDvt1.Text.Equals(string.Empty))
        //    {
        //        this.txtHe_So1.Value = 1;
        //        this.txtGia_Mua1.Value = 0;
        //        this.txtGia_Ban1.Value = 0;
        //        this.txtHe_So1.ReadOnly = true;
        //        this.txtGia_Mua1.ReadOnly = true;
        //        this.txtGia_Ban1.ReadOnly = true;
        //    }
        //    else
        //    {
        //        this.txtHe_So1.ReadOnly = false;
        //        this.txtGia_Mua1.ReadOnly = false;
        //        this.txtGia_Ban1.ReadOnly = false;
        //    }
        //    if (this.txtDvt2.Text.Equals(string.Empty))
        //    {
        //        this.txtHe_So2.Value = 1;
        //        this.txtGia_Mua2.Value = 0;
        //        this.txtGia_Ban2.Value = 0;
        //        this.txtHe_So2.ReadOnly = true;
        //        this.txtGia_Mua2.ReadOnly = true;
        //        this.txtGia_Ban2.ReadOnly = true;
        //    }
        //    else
        //    {
        //        this.txtHe_So2.ReadOnly = false;
        //        this.txtGia_Mua2.ReadOnly = false;
        //        this.txtGia_Ban2.ReadOnly = false;
        //    }
        //    if (this.txtDvt3.Text.Equals(string.Empty))
        //    {
        //        this.txtHe_So3.Value = 1;
        //        this.txtGia_Mua3.Value = 0;
        //        this.txtGia_Ban3.Value = 0;
        //        this.txtHe_So3.ReadOnly = true;
        //        this.txtGia_Mua3.ReadOnly = true;
        //        this.txtGia_Ban3.ReadOnly = true;
        //    }
        //    else
        //    {
        //        this.txtHe_So3.ReadOnly = false;
        //        this.txtGia_Mua3.ReadOnly = false;
        //        this.txtGia_Ban3.ReadOnly = false;
        //    }
        //}

        //private void txtMa_Sp_GotFocus(object sender, EventArgs e)
        //{
        //    if (this.txtLoai_Vt.Text.Equals("1"))
        //    {
        //        this.txtMa_Sp.EmptyIsValid = false;
        //        this.txtMa_Sp.ReadOnly = false;
        //    }
        //    else
        //    {
        //        this.txtMa_Sp.Text = string.Empty;
        //        this.txtTen_Sp.Text = string.Empty;
        //        this.txtMa_Sp.EmptyIsValid = true;
        //        this.txtMa_Sp.ReadOnly = true;
        //    }
        //}
    }
}

